package com.qujia.station.utils;

import java.util.Random;


/**
 * 随机生成6位字符
 * */
public class RandomCharacterUtils {

    public static String generateRandomCharacter(){
        String characters ="abcdefghijklmnopgrstuvwxyzABCDEFGHIJKLMNOPORSTUVWXYZ1234567890";
        StringBuilder sb =new StringBuilder();
        Random random =new Random();

        for(int i=0;i<6;i++){
            int index=random.nextInt(characters.length());
            sb.append(characters.charAt(index));
        }

        return sb.toString();
    }
}
